tasklets: Switch a few tasklets to run in softirq context.
authorKeir Fraser <keir@xen.org>
Thu, 16 Jun 2011 15:57:22 +0000 (16:57 +0100)
committerKeir Fraser <keir@xen.org>
Thu, 16 Jun 2011 15:57:22 +0000 (16:57 +0100)
There are a couple of others which may also be safe. I've converted
only the most obvious one.

Signed-off-by: Keir Fraser <keir@xen.org>
xen/arch/x86/hvm/hvm.c
xen/common/trace.c
xen/drivers/char/console.c
xen/drivers/passthrough/io.c

index 98b40f7a4fb53c6048183a6b10ecc36d6c44f365..b74a02aabbabab6c3188f9de0fb696944d86b3f6 100644 (file)
@@ -992,9 +992,10 @@ int hvm_vcpu_initialise(struct vcpu *v)
     if ( rc != 0 )
         goto fail5;
 
-    tasklet_init(&v->arch.hvm_vcpu.assert_evtchn_irq_tasklet,
-                 (void(*)(unsigned long))hvm_assert_evtchn_irq,
-                 (unsigned long)v);
+    softirq_tasklet_init(
+        &v->arch.hvm_vcpu.assert_evtchn_irq_tasklet,
+        (void(*)(unsigned long))hvm_assert_evtchn_irq,
+        (unsigned long)v);
 
     v->arch.user_regs.eflags = 2;
 
index 41b7e3c407c1931412b5f25ddbe534e8355a87e4..6e5c1d8e4bbaaa6c6ef5c97f65ad45085c13aa46 100644 (file)
@@ -641,7 +641,8 @@ static void trace_notify_dom0(unsigned long unused)
 {
     send_guest_global_virq(dom0, VIRQ_TBUF);
 }
-static DECLARE_TASKLET(trace_notify_dom0_tasklet, trace_notify_dom0, 0);
+static DECLARE_SOFTIRQ_TASKLET(trace_notify_dom0_tasklet,
+                               trace_notify_dom0, 0);
 
 /**
  * trace - Enters a trace tuple into the trace buffer for the current CPU.
index c8cf8992df44485dfb7bf443d158910f4bc00a33..8a4c6845b14175be6fffa02c9a4f260c4b8717b1 100644 (file)
@@ -316,7 +316,8 @@ static void notify_dom0_con_ring(unsigned long unused)
 {
     send_guest_global_virq(dom0, VIRQ_CON_RING);
 }
-static DECLARE_TASKLET(notify_dom0_con_ring_tasklet, notify_dom0_con_ring, 0);
+static DECLARE_SOFTIRQ_TASKLET(notify_dom0_con_ring_tasklet,
+                               notify_dom0_con_ring, 0);
 
 static long guest_console_write(XEN_GUEST_HANDLE(char) buffer, int count)
 {
index aa7f07d844013896d363f612b306d559497ef67d..ad08833d48b93349d2c2cac7cbcdc3393302b47f 100644 (file)
@@ -127,8 +127,9 @@ int pt_irq_create_bind_vtd(
             return -ENOMEM;
         }
         memset(hvm_irq_dpci, 0, sizeof(*hvm_irq_dpci));
-        tasklet_init(&hvm_irq_dpci->dirq_tasklet,
-                     hvm_dirq_assist, (unsigned long)d);
+        softirq_tasklet_init(
+            &hvm_irq_dpci->dirq_tasklet,
+            hvm_dirq_assist, (unsigned long)d);
         hvm_irq_dpci->mirq = xmalloc_array(struct hvm_mirq_dpci_mapping,
                                            d->nr_pirqs);
         hvm_irq_dpci->dirq_mask = xmalloc_array(unsigned long,